<!DOCTYPE html>
<html lang="en" class="no-js">
  <script src="https://cdn.jsdelivr.net/npm/clipboard@1/dist/clipboard.min.js"></script>
  <head>
  <meta charset="utf-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
  <meta name="generator" content="Hugo 0.55.6" />

  <meta name="ROBOTS" content="INDEX, FOLLOW" />

  <link rel="alternate" type="application/rss&#43;xml" href="/index.xml" />

  <link rel="shortcut icon" href="/assets/favicons/favicon.ico" />
  <link rel="apple-touch-icon" href="/assets/favicons/apple-touch-icon.png" sizes="180x180" />
  <link rel="icon" type="image/png" href="/assets/favicons/favicon-16x16.png" sizes="16x16" />
  <link rel="icon" type="image/png" href="/assets/favicons/favicon-32x32.png" sizes="32x32" />
  <link rel="icon" type="image/png" href="/assets/favicons/android-144x144.png" sizes="36x36" />
  <link rel="icon" type="image/png" href="/assets/favicons/android-144x144.png" sizes="48x48" />
  <link rel="icon" type="image/png" href="/assets/favicons/android-144x144.png" sizes="72x72" />
  <link rel="icon" type="image/png" href="/assets/favicons/android-144x144.png" sizes="96x96" />
  <link rel="icon" type="image/png" href="/assets/favicons/android-144x144.png" sizes="144x144" />
  <link rel="icon" type="image/png" href="/assets/favicons/android-192x192.png" sizes="192x192" />

  <title>Contributing to Model Relationships | Meshery</title>
  <meta property="og:title" content="Contributing to Model Relationships" />
  <meta property="og:description"
    content="How to contribute to Meshery Models Relationships, Policies..." />
  <meta property="og:type" content="website" />
  <meta property="og:url" content="http://localhost:4000" />
  <meta property="og:site_name" content="http://localhost:4000" />
  <meta property="og:image"
    content="https://raw.githubusercontent.com/meshery/meshery/master/docs/assets/img/meshery-cncf-twitter.png" />

  <meta itemprop="name" content="Contributing to Model Relationships" />
  <meta itemprop="description"
    content="How to contribute to Meshery Models Relationships, Policies..." />

  <meta name="twitter:card" content="summary" />
  <meta name="twitter:title" content="Contributing to Model Relationships" />
  <meta name="twitter:description"
    content="How to contribute to Meshery Models Relationships, Policies..." />
  <meta name="twitter:image"
    content="https://raw.githubusercontent.com/meshery/meshery/master/docs/assets/img/meshery-cncf-twitter.png" />
  
    <!-- <link rel="stylesheet" href="/assets/css/palette.css" /> -->
  <!-- <link rel="stylesheet" href="/assets/css/anchorjs.css" /> -->
  <link rel="stylesheet" href="/assets/css/sass.css" />
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.11.2/css/all.css" />

  <!-- Google Tag Manager -->
  <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
    new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
    j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
    'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
    })(window,document,'script','dataLayer','GTM-PCGTC98C');</script>

  <!-- End Google Tag Manager -->
  
  
  <script src="https://code.jquery.com/jquery-3.3.1.min.js"
    integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.tablesorter/2.31.3/js/jquery.tablesorter.min.js"
    integrity="sha512-qzgd5cYSZcosqpzpn7zF2ZId8f/8CHmFKZ8j7mU4OUXTNRd5g+ZHBPsgKEwoqxCtdQvExE5LprwwPAgoicguNg=="
    crossorigin="anonymous" referrerpolicy="no-referrer"></script>



  <!-- Anchorjs included for adding hover anchor links to headings -->
  <script src="https://cdnjs.cloudflare.com/ajax/libs/anchor-js/4.2.2/anchor.min.js"></script>
  <script>
    $(function () {
      /** AnchorJS options and selector */
      anchors.options = {
        visible: "hover",
        placement: "right",
      };
      anchors.add("h1, h2, h3, h4, h5");
    });
    // Function to handle anchor links
    document.addEventListener('click', function (event) {
      if (event.target.tagName === 'A' && event.target.getAttribute('href').startsWith('#')) {
        window.location.hash = event.target.getAttribute('href');
      }
    });
  </script>
</head>
 <header>
  <nav class="js-navbar-scroll navbar">
    <a class="navbar-brand" href="/">
      <div class="navbar-logo">
        <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1703.46 182.75"><defs><style>.cls-1{fill:#00d3a9;}.cls-2{fill:#00b39f;}.cls-3{fill:#3c494f;}</style></defs><g id="Layer_2" data-name="Layer 2"><g id="Layer_1-2" data-name="Layer 1"><path class="cls-1" d="M96,43.12V86.7l38.52-21.91Z"/><path class="cls-1" d="M96,95.82v43.92l38.87-21.9Z"/><path class="cls-2" d="M90.43,86.47v-43L52.38,64.91Z"/><path class="cls-2" d="M14,139.51a93,93,0,0,0,29.56,29.21v-46Z"/><path class="cls-2" d="M90.42,139.51V96.17L52.25,117.84Z"/><path class="cls-1" d="M49.08,166,87.72,144.3,49.08,122.4Z"/><path class="cls-2" d="M137.57,166.21V122.63L98.94,144.31Z"/><path class="cls-2" d="M175.4,134.5a89.15,89.15,0,0,0,10.94-39.13L146.07,118Z"/><path class="cls-1" d="M143.13,113.28,182,91.49,143.13,69.7Z"/><path class="cls-2" d="M137.56,60.23V17L99.15,38.56Z"/><path class="cls-2" d="M137.55,113.05V69.47L99,91.26Z"/><path class="cls-1" d="M49.08,69.36v44L88,91.26Z"/><path class="cls-2" d="M90.43,0a93.2,93.2,0,0,0-41,10.61l41,23Z"/><path class="cls-1" d="M49.08,16.65V60.46L88,38.56Z"/><path class="cls-2" d="M43.55,14A91.83,91.83,0,0,0,14,43.23L43.55,60V14Z"/><path class="cls-1" d="M137.32,10.84A94.71,94.71,0,0,0,96,0V34Z"/><path class="cls-1" d="M0,94.57a89.28,89.28,0,0,0,11.17,40.27l29.91-17Z"/><path class="cls-1" d="M11.17,47.91A90.17,90.17,0,0,0,0,88.06L41.08,64.91l-30-17Z"/><path class="cls-2" d="M49.47,172a93.47,93.47,0,0,0,41,10.61V149l-41,22.93Z"/><path class="cls-1" d="M172.46,43.35a93,93,0,0,0-29.33-29.09V60Z"/><path class="cls-1" d="M143.13,168.6a91.72,91.72,0,0,0,29.45-29.31l-29.45-16.66v46Z"/><path class="cls-2" d="M186.42,87.72A89.58,89.58,0,0,0,175.36,48L145.68,64.79Z"/><path class="cls-1" d="M96,182.75a93.24,93.24,0,0,0,41-10.61L96,148.87Z"/><path class="cls-2" d="M43.55,112.94V69.81L5.38,91.26Z"/><path class="cls-3" d="M784.8,56.17v92H889.85v-22h-83V104.6h63.94v-22H806.81V61.05h83v-22H784.8Z"/><path class="cls-3" d="M379.53,56.17v92H485v-22H402V104.6H465.9v-22H402V61.05H485v-22H379.53Z"/><path class="cls-3" d="M630.74,119.66a23.83,23.83,0,0,1-2.49,11,28.89,28.89,0,0,1-6.22,9,35.86,35.86,0,0,1-9.14,6.1,27.83,27.83,0,0,1-11.21,2.44H497.87V125.36H601.68a5.38,5.38,0,0,0,4.15-1.63,5.15,5.15,0,0,0,1.66-4.07v-9a5.15,5.15,0,0,0-1.66-4.07,5.38,5.38,0,0,0-4.15-1.63H526.94a25.15,25.15,0,0,1-11.22-2.44,29.55,29.55,0,0,1-9.13-6.11,34.86,34.86,0,0,1-6.23-8.95,23.86,23.86,0,0,1-2.49-11v-9a23.79,23.79,0,0,1,2.49-11,34.74,34.74,0,0,1,6.23-9,35.37,35.37,0,0,1,9.13-6.1,25.15,25.15,0,0,1,11.22-2.45h103.8v23.2H526.94a5.42,5.42,0,0,0-4.16,1.63A5.19,5.19,0,0,0,521.12,68v9A5.2,5.2,0,0,0,522.78,81a5.41,5.41,0,0,0,4.16,1.62h74.74a25.11,25.11,0,0,1,11.21,2.45,35.6,35.6,0,0,1,9.14,6.1,34.71,34.71,0,0,1,6.22,9,26.4,26.4,0,0,1,2.49,11Z"/><path class="cls-3" d="M770.68,148.15H749.51V105.42H666.87v42.73H645.7V82.22H749.51V39.07h21.17ZM666.87,72H645.7V39.48h21.17Z"/><path class="cls-3" d="M1073,77.33l-27.83-38.26h-27.82l44.43,65.53v43.55h22.43V104.6l44.43-65.53h-27.41Z"/><path class="cls-3" d="M927.64,59.83h56.89V83H938.85v20.76h10.38l40.28,44.77h27.41l-40.28-44.77h15.78a17.37,17.37,0,0,0,17.44-17.1V56.17a17.38,17.38,0,0,0-17.44-17.1H906.05V147.75h22Z"/><path class="cls-3" d="M360.43,57.39c-4.57-10.58-15.78-18.32-27.82-17.91H223.81V148.56h23.67V62.27c32.39,0,86.37-.4,87.62.41,8.3-2.44,2.49,82.22,4.15,85.07h23.67C361.67,140.42,365,62.27,360.43,57.39Z"/><path class="cls-3" d="M305.2,74.48H281.53v73.67H305.2Z"/><rect class="cls-3" x="1235.62" y="1.38" width="5" height="180"/><path class="cls-3" d="M1408,39.61c28.88,0,49.39,23.49,49.39,52.38s-20.51,52.38-49.39,52.38h-40.42a2.68,2.68,0,0,1-3-3V42.6a2.68,2.68,0,0,1,3-3H1408Zm0,94.89c23.34,0,39.21-19,39.21-42.51S1431.34,49.48,1408,49.48h-32.93v85Zm101.7,11.67A39.22,39.22,0,1,1,1549.07,107,38.9,38.9,0,0,1,1509.7,146.17Zm0-9.58A29.64,29.64,0,1,0,1480.22,107,29.2,29.2,0,0,0,1509.7,136.59ZM1633,120.43c2.09,0,3.29,1.34,2.39,3.44-5.24,13.32-18.86,22.3-34.72,22.3-22.6,0-39.37-17.06-39.37-39.21s16.77-39.22,39.37-39.22c15.86,0,29.33,9,34.72,22.3.9,2.1-.3,3.45-2.39,3.45h-4.35a3.76,3.76,0,0,1-3.59-2.25c-4.49-8.53-13.62-13.92-24.39-13.92a29.64,29.64,0,0,0,0,59.27c10.92,0,20-5.54,24.39-13.92a3.76,3.76,0,0,1,3.59-2.24Zm26.44-31.28c0,19,44,7.63,44,35.62,0,12.27-11.07,21.4-27.69,21.4-15.41,0-26-7.78-27.54-20.35-.15-2.1,1-3.15,3-3.15h3.89c1.79,0,2.69,1,3.14,2.85,1.35,8.23,9,11.07,17.51,11.07,9.43,0,17.81-3.44,17.81-11.82,0-19-44-7.64-44-35.62,0-12.28,11.08-21.41,26.19-21.41,14.07,0,24.55,7.79,26,20.36.15,2.09-1,3.14-3,3.14h-3.89c-1.8,0-2.69-1-3.14-2.84-1.35-8.23-8.83-11.08-16-11.08C1667.84,77.32,1659.46,80.77,1659.46,89.15Z"/></g></g></svg>
      </div>
      <div class="mobile">
        <svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 379.08 80.17"><defs><style>.cls-1{fill:#00d3a9;}.cls-2{fill:#00b39f;}.cls-3 {fill:var(--meshery-logo-text-fill);}</style></defs><polygon class="cls-1" points="41.26 18.9 41.26 38.04 57.86 28.43 41.26 18.9"/><polygon class="cls-1" points="41.26 42.05 41.26 61.29 58.01 51.71 41.26 42.05"/><polygon class="cls-2" points="38.87 37.91 38.87 19.06 22.48 28.45 38.87 37.91"/><path class="cls-2" d="M6,61.22A40.35,40.35,0,0,0,18.71,74V53.86Z"/><polygon class="cls-2" points="38.87 61.2 38.87 42.19 22.44 51.7 38.87 61.2"/><polygon class="cls-1" points="21.1 72.81 37.74 63.3 21.1 53.68 21.1 72.81"/><polygon class="cls-2" points="59.15 72.92 59.15 53.81 42.53 63.31 59.15 72.92"/><path class="cls-2" d="M75.42,59a39.88,39.88,0,0,0,4.71-17.18l-17.32,9.9Z"/><polygon class="cls-1" points="61.54 49.7 78.23 40.15 61.54 30.55 61.54 49.7"/><polygon class="cls-2" points="59.15 26.42 59.15 7.43 42.61 16.91 59.15 26.42"/><polygon class="cls-2" points="59.15 49.61 59.15 30.45 42.57 40.05 59.15 49.61"/><polygon class="cls-2" points="40.07 80.17 40.07 80.17 40.07 80.17 40.07 80.17"/><polygon class="cls-1" points="21.1 30.41 21.1 49.72 37.8 40.05 21.1 30.41"/><path class="cls-2" d="M38.87,0A40,40,0,0,0,21.28,4.65L38.87,14.77Z"/><polygon class="cls-1" points="21.1 7.31 21.1 26.49 37.81 16.91 21.1 7.31"/><path class="cls-2" d="M18.71,6.14A40.28,40.28,0,0,0,6,18.94l12.72,7.34Z"/><path class="cls-1" d="M59,4.74A40,40,0,0,0,41.26,0V14.93Z"/><path class="cls-1" d="M0,41.48A40,40,0,0,0,4.79,59.16L17.67,51.7Z"/><path class="cls-1" d="M4.79,21A40,40,0,0,0,0,38.58L17.69,28.45Z"/><path class="cls-2" d="M21.24,75.49a39.88,39.88,0,0,0,17.63,4.66V65.41Z"/><path class="cls-1" d="M74.17,19A40.24,40.24,0,0,0,61.54,6.21v20.1Z"/><path class="cls-1" d="M61.54,74A40.34,40.34,0,0,0,74.23,61.07L61.54,53.75Z"/><path class="cls-2" d="M80.13,38.48a39.88,39.88,0,0,0-4.76-17.42L62.64,28.43Z"/><path class="cls-1" d="M41.26,80.15a39.79,39.79,0,0,0,17.59-4.64L41.26,65.34Z"/><polygon class="cls-2" points="18.71 49.54 18.71 30.61 2.27 40.04 18.71 49.54"/><polygon class="cls-3" points="269.94 29.39 269.94 30.89 269.94 37.93 269.94 46.53 269.94 59.08 303.36 59.08 303.36 52.03 276.99 52.03 276.99 46.53 276.99 44.98 297.25 44.98 297.25 37.93 276.99 37.93 276.99 30.89 303.36 30.89 303.36 23.84 269.94 23.84 269.94 29.39"/><polygon class="cls-3" points="141.41 29.39 141.41 30.89 141.41 37.93 141.41 46.53 141.41 59.08 174.83 59.08 174.83 52.03 148.46 52.03 148.46 46.53 148.46 44.98 168.72 44.98 168.72 37.93 148.46 37.93 148.46 30.89 174.83 30.89 174.83 23.84 141.41 23.84 141.41 29.39"/><path class="cls-3" d="M221.08,49.87a8.74,8.74,0,0,1-.73,3.57,9,9,0,0,1-2,2.94,9.5,9.5,0,0,1-2.93,2,9,9,0,0,1-3.6.73h-33V51.66h33a1.78,1.78,0,0,0,1.79-1.79V47a1.76,1.76,0,0,0-.52-1.27,1.73,1.73,0,0,0-1.27-.51H188.09a8.74,8.74,0,0,1-3.57-.73,9.4,9.4,0,0,1-5-5,8.9,8.9,0,0,1-.73-3.57V33.09a9.11,9.11,0,0,1,.73-3.59,9.58,9.58,0,0,1,2-2.94,9.32,9.32,0,0,1,3-2,8.9,8.9,0,0,1,3.57-.72h33v7.47h-33a1.78,1.78,0,0,0-1.79,1.78V36a1.78,1.78,0,0,0,1.79,1.79h23.73a9.11,9.11,0,0,1,3.6.72,9.59,9.59,0,0,1,2.93,2,9.41,9.41,0,0,1,2,2.94,8.9,8.9,0,0,1,.73,3.59Z"/><path class="cls-3" d="M265.54,59.08h-6.73V45.22H232.6V59.08h-6.72V37.75h32.93V23.84h6.73ZM232.6,34.44h-6.72V23.84h6.72Z"/><polygon class="cls-3" points="361.45 36.17 352.64 23.84 343.83 23.84 357.93 44.98 357.93 59.08 364.98 59.08 364.98 44.98 379.08 23.84 370.38 23.84 361.45 36.17"/><path class="cls-3" d="M315.35,30.56h18.07v7.33H318.86v6.72h3.34L335,59.08h8.7L330.9,44.61h5a5.48,5.48,0,0,0,5.48-5.48V29.31a5.47,5.47,0,0,0-5.48-5.47H308.44V59.08h7.05Z"/><path class="cls-3" d="M136,59.08h-7.47V33.38a1.94,1.94,0,0,0-.16-.8,2.15,2.15,0,0,0-1.11-1.11,1.94,1.94,0,0,0-.8-.16H91.91V23.84h34.54a9.22,9.22,0,0,1,3.69.75,9.38,9.38,0,0,1,5.1,5.1,9.22,9.22,0,0,1,.75,3.69Zm-36.6,0H91.91V31.31l7.48-2Zm18.28,0h-7.48V35.22h7.48Z"/></svg>
      </div>
    </a>

    <div id="main_navbar">
      <ul class="navbar-nav">
        <!-- 
			<li class="nav-item">
        <a class="nav-link" href="https://github.com/meshery/meshery" target="_blank"><span>GitHub</span></a>
      </li>  -->

        <!-- Internal links -->
        
        <li class="nav-item">
          <a
            class="nav-link"
            href="/installation/quick-start"
            ><span>Quick Start</span></a
          >
        </li>
        
        <li class="nav-item">
          <a
            class="nav-link"
            href="https://meshery.io"
            ><span>Website</span></a
          >
        </li>
        
        <li class="nav-item">
          <a
            class="nav-link"
            href="http://discuss.meshery.io/"
            ><span>Discuss</span></a
          >
        </li>
        
        <li class="nav-item">
          <a
            class="nav-link"
            href="https://meshery.io/catalog"
            ><span>Catalog</span></a
          >
        </li>
        
        <li class="nav-item">
          <a
            class="nav-link"
            href="https://meshery.io/blog"
            ><span>Blog</span></a
          >
        </li>
        
        
        <a href="https://play.meshery.io">
          <div class="nav-btn">Playground</div>
        </a>
        <!--Version Selector -->
        <select
          onchange="window.location=this.value"
          class="appearance-none flex-1 w-full px-0 py-1 placeholder-gray-900 tracking-wide focus:outline-none version-selector"
          name="versioningSelection"
          id="versioningSelection"
        >
          <!-- <option value="">Versions</option> -->
           <!-- we get the version selected, and put it to the right option  --><option
            
            value="/"
            class="nav-item mr-4 mb-2 mb-lg-0 text-black"
          >
            <span>latest</span>
          </option>
          <!-- we get the version selected, and put it to the right option  --><option
            
            value="/v0.6"
            class="nav-item mr-4 mb-2 mb-lg-0 text-black"
          >
            <span>v0.6</span>
          </option>
          <!-- we get the version selected, and put it to the right option  --><option
            
            value="/v0.5"
            class="nav-item mr-4 mb-2 mb-lg-0 text-black"
          >
            <span>v0.5</span>
          </option>
          <!-- we get the version selected, and put it to the right option  --><option
            
            value="/v0.4"
            class="nav-item mr-4 mb-2 mb-lg-0 text-black"
          >
            <span>v0.4</span>
          </option>
          
        </select>
      </ul>
    </div>

    <div class="icon-container">
      <button class="nav-toggle-btn nav-toggle-btn--main">
        <svg
          id="menu-nav-toggle-btn"
          xmlns="http://www.w3.org/2000/svg"
          viewBox="0 0 24 24"
          fill="none"
          stroke="currentColor"
          stroke-width="2"
          stroke-linecap="round"
          stroke-linejoin="round"
          class="feather feather-menu"
        >
          <line x1="3" y1="12" x2="21" y2="12"></line>
          <line x1="3" y1="6" x2="21" y2="6"></line>
          <line x1="3" y1="18" x2="21" y2="18"></line>
        </svg>
      </button>
      <button class="nav-mode-icon" id="mode-toggle-btn" style="text-align: center">
        <img class="nav-text" id="logo-dark-light" src="/assets/img/nav-icons/mode-toggle-icon-moon.png" 
        data-logo-for-dark="/assets/img/nav-icons/mode-toggle-icon-moon.png"
        data-logo-for-light="/assets/img/nav-icons/mode-toggle-icon-sun.png"
        />
      </button>
    </div>

    <!--Search Bar
    <div class="navbar-nav d-none d-lg-block"><input type="search" class="form-control td-search-input" placeholder="&#xf002 Search this site…" aria-label="Search this site…" autocomplete="off"></div>-->

    <!-- meshery-custom-begin
	<div class="navbar-nav d-none d-lg-block">
          <a class="gh-source" data-gh-source="github" href="https://github.com/meshery/meshery" title="Go to repository" data-md-state="done">
          <div class="gh-source__repository">
            <i class="fab fa fa-github fa-2x" style='padding-right:20px; float:left; margin-top:5px'></i>
            meshery/meshery
          <ul class="gh-source__facts"><li class="gh-source__fact" id='stars'></li><li id="forks" class="gh-source__fact"></li></ul></div></a>
        </div>
      </div>
meshery-custom-end -->
  </nav>
</header>

<!-- meshery-custom-begin
<script>
$(document).ready(function() {
  var url = "https://api.github.com/search/repositories?q=meshery/meshery";
  fetch(url, { 
      headers: {"Accept":"application/vnd.github.preview"}
  }).then(function(e) {
    return e.json()
  }).then(function(r) {
     console.log(r.items[0])
     stars = r.items[0]['stargazers_count']
     forks = r.items[0]['forks_count']
     $('#stars').text(stars + " Stars")
     $('#forks').text(forks + " Forks")
  });
});
</script>
meshery-custom-end -->


  <body class="td-section dark-mode">
    <script>
      if(localStorage.getItem("mode") == "light-mode")  {
      document.body.classList.remove("dark-mode");
      const allLogos = document.querySelectorAll("#logo-dark-light");
      allLogos.forEach(e => e.src = e.dataset.logoForLight);
  }
    </script>
    <!-- Google Tag Manager -->
    <noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-PCGTC98C"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
    <!-- End Google Tag Manager -->

    <div class="flex-container">
      <div class="left-container">
        <div class="sidebar-container-wrapper">
          <div class="sidebar-container"><div class="sidebar-menu">
  <form class="sidebar__search-form">
    <input
      type="search"
      class="sidebar__search-input"
      id="sidebar-search-input"
      placeholder="Search this site..."
      aria-label="Search this site..."
      autocomplete="off"
    />
  </form>
  <!-- <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css"> -->
  <script type="text/javascript">
    // <!--Ref: https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView-->
    // <!--Ref: https://stackoverflow.com/questions/11039885/scrollintoview-causing-the-whole-page-to-move-->
    (() => {
      window.addEventListener("load", function () {
        let scrollElem = document.getElementsByClassName("sidebar-nav__section-link active").item(0);
        if (scrollElem) {
         scrollElem.scrollIntoView({ behavior: "smooth", block: "nearest", inline: "start" });
        }
        let activeSections = document.querySelectorAll(".sidebar-nav__section-link.active");
      activeSections.forEach(function (activeSection) {
        let parentCollapse = activeSection.closest(".collapse");
        if (parentCollapse) {
          parentCollapse.classList.add("show");
        }
      });
    });
  })();
  </script>

  <nav class="sidebar-nav" id="td-section-nav">
    
    <ul class="sidebar-nav__section">
       

      <li class="sidebar-nav__section-title">
        <!-- Toggle button -->
        <div class="toggle"  data-toggle="collapse" data-target="#section0" aria-expanded="false" aria-controls="section0"> ⇅ </div>
        <a
          href="/project/overview"  class="toggle"  data-toggle="collapse" data-target="#section0" aria-expanded="false" aria-controls="section0"
          class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section "
          > 🗺 Overview & Installation
        </a>
  
      
          <ul class="td-sidebar-nav__section collapse" id="section0">
             
            <li class="sidebar-nav__section-link ">
              <a
                href="/project/faq"
                class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section"
                >FAQs</a
              >
            </li>
              <!-- end pageurl -->
             
            <li class="sidebar-nav__section-link ">
              <a
                href="/installation/quick-start"
                class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section"
                >🚀 Quick Start</a
              >
            </li>
              <!-- end pageurl -->
             
            <li class="sidebar-nav__section-link ">
              <a
                href="/installation"
                class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section"
                >Installation ↆ</a
              >
            </li>
              <!-- end pageurl -->
             <!--  section.links -->
          </ul>
       <!--  section.links -->
    </li>
  </ul> <!-- end of "sidebar-nav__section" -->
  
    <ul class="sidebar-nav__section">
       

      <li class="sidebar-nav__section-title">
        <!-- Toggle button -->
        <div class="toggle"  data-toggle="collapse" data-target="#section1" aria-expanded="false" aria-controls="section1"> ⇅ </div>
        <a
          href="/concepts"  class="toggle"  data-toggle="collapse" data-target="#section1" aria-expanded="false" aria-controls="section1"
          class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section "
          > 🧠 Concepts
        </a>
  
      
          <ul class="td-sidebar-nav__section collapse" id="section1">
             
            <li class="sidebar-nav__section-link ">
              <a
                href="/concepts/architecture"
                class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section"
                >Architectural ↆ</a
              >
            </li>
              <!-- end pageurl -->
             
            <li class="sidebar-nav__section-link ">
              <a
                href="/concepts/logical"
                class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section"
                >Logical ↆ</a
              >
            </li>
              <!-- end pageurl -->
             <!--  section.links -->
          </ul>
       <!--  section.links -->
    </li>
  </ul> <!-- end of "sidebar-nav__section" -->
  
    <ul class="sidebar-nav__section">
       

      <li class="sidebar-nav__section-title">
        <!-- Toggle button -->
        <div class="toggle"  data-toggle="collapse" data-target="#section2" aria-expanded="false" aria-controls="section2"> ⇅ </div>
        <a
          href="/guides"  class="toggle"  data-toggle="collapse" data-target="#section2" aria-expanded="false" aria-controls="section2"
          class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section "
          > 📚 Guides & Tutorials
        </a>
  
      
          <ul class="td-sidebar-nav__section collapse" id="section2">
             
            <li class="sidebar-nav__section-link ">
              <a
                href="/guides/infrastructure-management/overview"
                class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section"
                >⚙️ Infrastructure Management ↆ</a
              >
            </li>
              <!-- end pageurl -->
             
            <li class="sidebar-nav__section-link ">
              <a
                href="/guides/configuration-management"
                class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section"
                >Configuring Kubernetes Infrastructure ↆ</a
              >
            </li>
              <!-- end pageurl -->
             
            <li class="sidebar-nav__section-link ">
              <a
                href="/guides/events-management"
                class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section"
                >Managing Events with Notification Center</a
              >
            </li>
              <!-- end pageurl -->
             
            <li class="sidebar-nav__section-link ">
              <a
                href="/guides/infrastructure-management/gitops-with-meshery"
                class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section"
                >GitOps with Meshery</a
              >
            </li>
              <!-- end pageurl -->
             
            <li class="sidebar-nav__section-link ">
              <a
                href="/guides/performance-management"
                class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section"
                >Performance Management ↆ</a
              >
            </li>
              <!-- end pageurl -->
             
            <li class="sidebar-nav__section-link ">
              <a
                href="/guides/mesheryctl"
                class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section"
                >Using Meshery CLI Guides ↆ</a
              >
            </li>
              <!-- end pageurl -->
             
            <li class="sidebar-nav__section-link ">
              <a
                href="/guides/troubleshooting"
                class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section"
                >Troubleshooting Guides ↆ</a
              >
            </li>
              <!-- end pageurl -->
             
            <li class="sidebar-nav__section-link ">
              <a
                href="/guides/tutorials"
                class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section"
                >🧑‍🔬 Tutorials ↆ</a
              >
            </li>
              <!-- end pageurl -->
             <!--  section.links -->
          </ul>
       <!--  section.links -->
    </li>
  </ul> <!-- end of "sidebar-nav__section" -->
  
    <ul class="sidebar-nav__section">
       

      <li class="sidebar-nav__section-title">
        <!-- Toggle button -->
        <div class="toggle"  data-toggle="collapse" data-target="#section3" aria-expanded="false" aria-controls="section3"> ⇅ </div>
        <a
          href="/extensibility"  class="toggle"  data-toggle="collapse" data-target="#section3" aria-expanded="false" aria-controls="section3"
          class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section "
          > 🛠 Integrations & Extensions
        </a>
  
      
          <ul class="td-sidebar-nav__section collapse" id="section3">
             
            <li class="sidebar-nav__section-link ">
              <a
                href="/extensibility/api"
                class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section"
                >APIs</a
              >
            </li>
              <!-- end pageurl -->
             
            <li class="sidebar-nav__section-link ">
              <a
                href="/extensibility/adapters"
                class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section"
                >Adapters ↆ</a
              >
            </li>
              <!-- end pageurl -->
             
            <li class="sidebar-nav__section-link ">
              <a
                href="/extensibility/integrations"
                class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section"
                >Integrations</a
              >
            </li>
              <!-- end pageurl -->
             
            <li class="sidebar-nav__section-link ">
              <a
                href="/extensibility/load-generators"
                class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section"
                >Load Generators</a
              >
            </li>
              <!-- end pageurl -->
             
            <li class="sidebar-nav__section-link ">
              <a
                href="/extensibility/providers"
                class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section"
                >Providers</a
              >
            </li>
              <!-- end pageurl -->
             
            <li class="sidebar-nav__section-link ">
              <a
                href="/extensibility/ui"
                class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section"
                >UI Plugins</a
              >
            </li>
              <!-- end pageurl -->
             
            <li class="sidebar-nav__section-link ">
              <a
                href="/extensions"
                class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section"
                >🦾 Extensions ↆ</a
              >
            </li>
              <!-- end pageurl -->
             <!--  section.links -->
          </ul>
       <!--  section.links -->
    </li>
  </ul> <!-- end of "sidebar-nav__section" -->
  
    <ul class="sidebar-nav__section">
       

      <li class="sidebar-nav__section-title">
        <!-- Toggle button -->
        <div class="toggle"  data-toggle="collapse" data-target="#section4" aria-expanded="false" aria-controls="section4"> ⇅ </div>
        <a
          href="/project"  class="toggle"  data-toggle="collapse" data-target="#section4" aria-expanded="false" aria-controls="section4"
          class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section "
          > 🧑‍💻 Contributing & Community
        </a>
  
      
          <ul class="td-sidebar-nav__section collapse" id="section4">
             
            <li class="sidebar-nav__section-link ">
              <a
                href="/project/community"
                class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section"
                >Community</a
              >
            </li>
              <!-- end pageurl -->
             
            <li class="sidebar-nav__section-link ">
              <a
                href="/project/contributing"
                class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section"
                >Contributing ↆ</a
              >
            </li>
             
             <ul style="margin-bottom: 0;">

                     
                  <li id="build-release-ci-ↆ">
                  <a
                    class="sidebar-nav__section-link "
                    id="m-contributing-community-contributing-ↆ-build-release-ci-ↆ"
                    href="/project/contributing/build-and-release"
                    >Build & Release (CI) ↆ</a>
                  </li>
                  
                  <ul style="margin-bottom: 0;">
                         
                      <li id="end-to-end-testing">
                        <a
                        class="sidebar-nav__section-link "
                        id="m-contributing-community-contributing-ↆ-end-to-end-testing"
                        href="/project/contributing/contributing-ui-tests"
                        ><strong style="color: var(--color-secondary-medium); font-weight: normal;">End-to-End Testing</strong></a
                      >
                      </li>
                       <!-- grandchild -->
                  </ul>
                  
                   <!-- end grandchild -->
                   
                  <li id="adapters">
                  <a
                    class="sidebar-nav__section-link "
                    id="m-contributing-community-contributing-ↆ-adapters"
                    href="/project/contributing/contributing-adapters"
                    >Adapters</a>
                  </li>
                   <!-- end grandchild -->
                   
                  <li id="cli-ↆ">
                  <a
                    class="sidebar-nav__section-link "
                    id="m-contributing-community-contributing-ↆ-cli-ↆ"
                    href="/project/contributing/contributing-cli"
                    >CLI ↆ</a>
                  </li>
                  
                  <ul style="margin-bottom: 0;">
                         
                      <li id="design-principles">
                        <a
                        class="sidebar-nav__section-link "
                        id="m-contributing-community-contributing-ↆ-design-principles"
                        href="/project/contributing/contributing-cli-guide"
                        ><strong style="color: var(--color-secondary-medium); font-weight: normal;">Design Principles</strong></a
                      >
                      </li>
                       <!-- grandchild -->
                  </ul>
                  
                   <!-- end grandchild -->
                   
                  <li id="docs">
                  <a
                    class="sidebar-nav__section-link "
                    id="m-contributing-community-contributing-ↆ-docs"
                    href="/project/contributing/contributing-docs"
                    >Docs</a>
                  </li>
                   <!-- end grandchild -->
                   
                  <li id="server-ↆ">
                  <a
                    class="sidebar-nav__section-link "
                    id="m-contributing-community-contributing-ↆ-server-ↆ"
                    href="/project/contributing/contributing-server"
                    >Server ↆ</a>
                  </li>
                  
                  <ul style="margin-bottom: 0;">
                         
                      <li id="server-events">
                        <a
                        class="sidebar-nav__section-link "
                        id="m-contributing-community-contributing-ↆ-server-events"
                        href="/project/contributing/contributing-server-events"
                        ><strong style="color: var(--color-secondary-medium); font-weight: normal;">Server Events</strong></a
                      >
                      </li>
                         
                      <li id="server-errors">
                        <a
                        class="sidebar-nav__section-link "
                        id="m-contributing-community-contributing-ↆ-server-errors"
                        href="/project/contributing/contributing-error"
                        ><strong style="color: var(--color-secondary-medium); font-weight: normal;">Server Errors</strong></a
                      >
                      </li>
                       <!-- grandchild -->
                  </ul>
                  
                   <!-- end grandchild -->
                   
                  <li id="ui">
                  <a
                    class="sidebar-nav__section-link "
                    id="m-contributing-community-contributing-ↆ-ui"
                    href="/project/contributing/contributing-ui"
                    >UI</a>
                  </li>
                  
                  <ul style="margin-bottom: 0;">
                         
                      <li id="notification-center">
                        <a
                        class="sidebar-nav__section-link "
                        id="m-contributing-community-contributing-ↆ-notification-center"
                        href="/project/contributing/contributing-ui-notification-center"
                        ><strong style="color: var(--color-secondary-medium); font-weight: normal;">Notification Center</strong></a
                      >
                      </li>
                       <!-- grandchild -->
                  </ul>
                  
                   <!-- end grandchild -->
                   
                  <li id="docker-extension">
                  <a
                    class="sidebar-nav__section-link "
                    id="m-contributing-community-contributing-ↆ-docker-extension"
                    href="/project/contributing/contributing-docker-extension"
                    >Docker Extension</a>
                  </li>
                   <!-- end grandchild -->
                   
                  <li id="policies">
                  <a
                    class="sidebar-nav__section-link "
                    id="m-contributing-community-contributing-ↆ-policies"
                    href="/project/contributing/contributing-policies"
                    >Policies</a>
                  </li>
                   <!-- end grandchild -->
                   
                  <li id="models-ↆ">
                  <a
                    class="sidebar-nav__section-link "
                    id="m-contributing-community-contributing-ↆ-models-ↆ"
                    href="/project/contributing/contributing-models"
                    >Models ↆ</a>
                  </li>
                  
                  <ul style="margin-bottom: 0;">
                         
                      <li id="components">
                        <a
                        class="sidebar-nav__section-link "
                        id="m-contributing-community-contributing-ↆ-components"
                        href="/project/contributing/contributing-components"
                        ><strong style="color: var(--color-secondary-medium); font-weight: normal;">Components</strong></a
                      >
                      </li>
                         
                      <li id="relationships">
                        <a
                        class="sidebar-nav__section-link  active "
                        id="m-contributing-community-contributing-ↆ-relationships"
                        href="/project/contributing/contributing-relationships"
                        ><strong style="color: var(--color-secondary-medium); font-weight: normal;">Relationships</strong></a
                      >
                      </li>
                       <!-- grandchild -->
                  </ul>
                  
                   <!-- end grandchild -->
                 <!-- children -->
              </ul> 
                <!-- end children -->
                <!-- end pageurl -->
             <!--  section.links -->
          </ul>
       <!--  section.links -->
    </li>
  </ul> <!-- end of "sidebar-nav__section" -->
  
    <ul class="sidebar-nav__section">
       

      <li class="sidebar-nav__section-title">
        <!-- Toggle button -->
        <div class="toggle"  data-toggle="collapse" data-target="#section5" aria-expanded="false" aria-controls="section5"> ⇅ </div>
        <a
          href="/reference"  class="toggle"  data-toggle="collapse" data-target="#section5" aria-expanded="false" aria-controls="section5"
          class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section "
          > 📖 Reference
        </a>
  
      
          <ul class="td-sidebar-nav__section collapse" id="section5">
             
            <li class="sidebar-nav__section-link ">
              <a
                href="/reference/error-codes"
                class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section"
                >Error Code Reference</a
              >
            </li>
              <!-- end pageurl -->
             
            <li class="sidebar-nav__section-link ">
              <a
                href="/reference/permissions"
                class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section"
                >Permissions Keys Reference</a
              >
            </li>
              <!-- end pageurl -->
             
            <li class="sidebar-nav__section-link ">
              <a
                href="/extensibility/api"
                class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section"
                >REST & GraphQL APIs ↆ</a
              >
            </li>
              <!-- end pageurl -->
             
            <li class="sidebar-nav__section-link ">
              <a
                href="/reference/mesheryctl"
                class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section"
                >CLI Command Reference</a
              >
            </li>
              <!-- end pageurl -->
             
            <li class="sidebar-nav__section-link ">
              <a
                href="/reference/meshery-operator-crds"
                class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section"
                >Meshery Operator CRDs</a
              >
            </li>
              <!-- end pageurl -->
             
            <li class="sidebar-nav__section-link ">
              <a
                href="/project/releases"
                class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section"
                >Releases</a
              >
            </li>
              <!-- end pageurl -->
             
            <li class="sidebar-nav__section-link ">
              <a
                href="/project/security-vulnerabilities"
                class="align-left pl-0 pr-2 td-sidebar-link td-sidebar-link__section"
                >Vulnerabilities</a
              >
            </li>
              <!-- end pageurl -->
             <!--  section.links -->
          </ul>
       <!--  section.links -->
    </li>
  </ul> <!-- end of "sidebar-nav__section" -->
  
</nav>
</div>
</div>
        </div>

        <div class="icon-container">
          <button class="nav-toggle-btn nav-toggle-btn--document">
            <?xml version="1.0" encoding="utf-8"?>
              <svg version="1.1" id="document-nav-toggle-btn" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
                x="0px" y="0px" viewBox="0 0 10.7 18.7" style="enable-background:new 0 0 10.7 18.7;" xml:space="preserve">
              <style type="text/css">
                .st0{stroke:#000000;stroke-width:1.5;stroke-miterlimit:10;}
              </style>
              <path class="st0" d="M8.1,9.4L1,1.9C0.7,1.7,0.7,1.2,1,1c0.3-0.3,0.7-0.3,1,0c0,0,0,0,0,0l7.8,7.9c0.3,0.3,0.3,0.7,0,1l-7.8,7.9
                c-0.3,0.3-0.7,0.3-1,0c0,0,0,0,0,0c-0.3-0.3-0.3-0.7,0-1L8.1,9.4z"/>
              </svg>
          </button>
        </div>
      </div>
      <main class="main-container" role="main">
        <nav aria-label="breadcrumb">
          <ol class="breadcrumb spb-1">
            <li class="breadcrumb-item active" aria-current="page"><div id="breadcrumbs">


   <a href="/">home</a>


  
    / <a href="/project">project</a> 
  

  
    / <a href="/project/contributing">contributing</a> 
  

  
    / contributing to model relationships
  

</div>

<!-- <a href="http://idratherbewriting.com" class="noCrossRef productSubtitle"> Home </a> > <a class="noCrossRef productSubtitle" href="http://localhost:4000">Learn API Doc</a> > contributing-model-relationships -->
</li>
          </ol>
        </nav>
        <div class="td-content">
          
          <h1>Contributing to Model Relationships</h1>
           <p><a href="/concepts/logical/relationships">Relationships</a> within <a href="/concepts/logical/models">Models</a> play a crucial role in establishing concrete visualisations of efficient data flow between different components of Meshery. These are used to classify the nature of interaction between one or more interconnected <a href="/concepts/logical/components">Components</a>.</p>

<h2 id="overview-of-steps-to-create-relationships">Overview of Steps to Create Relationships</h2>

<p><strong>Prework:</strong></p>

<ol>
  <li><a href="#relationship-identification">Relationship Identification</a></li>
  <li><a href="#relationship-visualizations">Relationship Classification</a></li>
</ol>

<p><strong>Development:</strong></p>
<ol>
  <li><a href="#relationship-definitions">Relationship Definition</a></li>
  <li><a href="#relationship-scopes">Relationship Scopes</a></li>
</ol>

<p><strong>Postwork:</strong></p>
<ol>
  <li><a href="#relationship-testing">Relationship Testing</a></li>
  <li><a href="#relationship-contribution">Relationship Contribution</a></li>
</ol>

<h2 id="prework">Prework</h2>

<p><a id="relationship-identification"></a></p>

<h3 id="1-characterize-the-relationship-and-any-specific-constraints">1. Characterize the relationship and any specific constraints</h3>

<p>Using your domain expertise, define the qualities of this new relationship. Identify and qualify any specific constraints to be enforced between one or more specific components within the same or different models. Let’s take an example to understand this better.</p>

<p>For example, you might know that a Kubernetes <code class="language-plaintext highlighter-rouge">Service</code> can have a network-based relatinship with a Kubernetes <code class="language-plaintext highlighter-rouge">Pod</code>. To codify this relationship, you would define the relationship as a <code class="language-plaintext highlighter-rouge">kind: edge</code> relationship with a <code class="language-plaintext highlighter-rouge">type: network</code>.</p>

<details close="">
<summary>Relationship Example</summary>
<pre><code class="language-yaml highlighter-rouge">
{
  "schemaVersion": "core.meshery.io/v1alpha2",
  "kind": "edge",
  "type": "network",
  "version": "v1.0.0",
  "metadata": {"description": "A relationship that defines network edges between components."}
  selector: [{
      "allow": {
         "from": [
            {
               "kind": "Service",
               "model": "kubernetes"
            }
         ],
         "to": [
            {
               "kind": "Pod",
               "model": "kubernetes"
            }
         ]
      },
      "deny": {}
   }]

</code></pre>
</details>

<p>You might <em>also</em> know that this relationship is constrained by the presence of a Kubernetes <code class="language-plaintext highlighter-rouge">Deployment</code> as the parent of the Kubernetes <code class="language-plaintext highlighter-rouge">Pod</code>. This constraint would be codified in the relationship definition by including the <code>deny</code> function in your selector.</p>

<details close="">
<summary>Example Relationship with Constraints</summary>
<pre><code class="language-yaml highlighter-rouge">
selector: [
   {
      "allow": {
         "from": [
            {
               "kind": "Service",
               "model": "kubernetes"
            }
         ],
         "to": [
            {
               "kind": "Pod",
               "model": "kubernetes"
            }
         ]
      },
      "deny": {
         "from": [
            {
               "kind": "Service",
               "model": "kubernetes"
            }
         ],
         "to": [
            {
               "kind": "Pod",
               "model": "kubernetes",
               "parent": "Deployment"
            }
         ]
      }
   }
]
</code></pre>
</details>

<p>Codify relationships leveraging your domain expertise. In this example, the relationship between the <code class="language-plaintext highlighter-rouge">Service</code> and <code class="language-plaintext highlighter-rouge">Pod</code> components in the Kubernetes model is defined with appropriate consideration of surrounding constraints (e.g. presence of a <code class="language-plaintext highlighter-rouge">Deployment</code>).</p>

<h4 id="understand-relationship-classifications">Understand Relationship Classifications</h4>

<p>Relationships can be classified into three main categories:</p>

<ol>
  <li>
    <p><strong>Hierarchical</strong> relationships involve either an ancestral connection of the components i.e. the creation/ deletion of a Component higher up affects the existence of the Components below in the lineage or a connection that involves the inheritance of features from one Component to the other.</p>

    <ol>
      <li><strong>Parent</strong>: A parent-child relationship implies the requirement of the parent component before the child component can be created. For example, a <code class="language-plaintext highlighter-rouge">Namespace</code> in Kubernetes can be a parent of <code class="language-plaintext highlighter-rouge">Pods</code> within that namespace. The namespace must exist before creating pods within it.</li>
      <li><strong>Inventory</strong>: A hierarchical inventory relationship implies the configuration of a(parent) component is patched with the configuration of other (child) component. For example, Wasm filters can inherit features and functionalities from Envoy filters. This can be used to build on existing functionalities provided by Envoy filters and further extend them using Wasm filters. It enables a modular and scalable approach to customize the behavior of the proxy while maintaining a clear hierarchy of features.</li>
    </ol>
  </li>
  <li>
    <p><strong>Edge</strong> relationships indicate the possibility of traffic flow between two components. They enable communication and interaction between different Components within the system.</p>

    <ol>
      <li><strong>Mount</strong>: This subtype addresses the storage and access possibility between involved components. For example, a <code class="language-plaintext highlighter-rouge">PersistentVolume</code> can be mounted to a <code class="language-plaintext highlighter-rouge">Pod</code> to provide persistent storage for the pod’s data.</li>
      <li><strong>Network</strong>: This deals with IP addresses and DNS names and provides stable endpoints for communication. For example, a <code class="language-plaintext highlighter-rouge">Service</code> provides a stable endpoint for accessing multiple replicas of a <code class="language-plaintext highlighter-rouge">Deployment</code>.</li>
      <li><strong>Firewall</strong>: This acts as an intermediary for communications which include standard networking protocols like TCP and UDP. It can enforce network policies to control traffic between components. For example, a <code class="language-plaintext highlighter-rouge">NetworkPolicy</code> can be used to manage the traffic flow between different <code class="language-plaintext highlighter-rouge">Pods</code> in the cluster.</li>
      <li><strong>Permission</strong>: This defines the permissions for components if they can have a possible relationship with other Components. It ensures that only authorized Components can interact with each other. For example, a <code class="language-plaintext highlighter-rouge">Role</code> can define permissions for Components to access specific resources.</li>
    </ol>
  </li>
  <li>
    <p><strong>Sibling</strong> relationships represent connections between components that are at the same hierarchical level or share a common parent. Siblings can have the same or similar functionalities or may interact with each other in specific ways. These relationships facilitate communication and cooperation between components that are in the same group or category. For example, a Service and a Pod in Kubernetes are siblings as they share a common parent and are at the same hierarchical level.</p>
  </li>
</ol>

<p><a id="relationship-visualizations"></a></p>

<h3 id="2-classify-relationship-type-and-specify-visual-representation">2. Classify relationship type and specify visual representation</h3>

<p>Browse and pick the most appropriate visualization for this relationship by using one of the predefined relationship visualizations.</p>

<style>
    figcaption {
        margin: 1rem auto;
    }
</style>

<details open="">
    <summary>Example Visual Representations</summary>
    <details close=""><summary>Kind: Hierarchical</summary>
        <figure>
            <figcaption>subType: Parent | Namespace (Parent) and ConfigMap (child), Role (Child)<a target="_blank" href="https://playground.meshery.io/extension/meshmap?mode=design&amp;design=6370ffcd-13a6-4a65-b426-30f1e63dc381"> (open in playground)</a></figcaption>
        </figure>
        <img alt="Hierarchical - Parent: Namespace to other components" src="/assets/img/meshmodel/relationships/hierarchical_parent_relationship.svg" />
        <br />
        <figure>
            <figcaption>subType: Inventory | Namespace and ConfigMap<a target="_blank" href="https://playground.meshery.io/extension/meshmap?design=21d40e36-8ab7-4f9f-9fed-f6a818510446"> (open in playground)</a></figcaption>
        </figure>
        <img alt="Hierarchical - Parent: Namespace to other components" src="/assets/img/meshmodel/relationships/hierarchical_inventory_relationship.svg" />
    </details>
    <!-- <details close><summary>Kind: Sibling</summary>
        <figure>
            <figcaption>Type: Match, subType: Matching Label Selectors</figcaption>
        </figure>
        <img alt=Sibling src="/assets/img/meshmodel/relationships/sibling_relationship.png"/>
    </details> -->
    <details close=""><summary>Kind: Edge</summary>
        <figure>
            <figcaption>Type: `Non-Binding`, subType: `Permission`: Cluster Role with Cluster Role Binding to Service Account<a target="_blank" href="https://playground.meshery.io/extension/meshmap?mode=design&amp;design=7dd39d30-7b14-4f9f-a66c-06ba3e5000fa"> (open in playground)</a></figcaption>
        </figure>
        <img alt="Binding" src="/assets/img/meshmodel/relationships/edge_permission_relationship_cluster_role_service_account.svg" />
        <figure>
            <figcaption>Type: `Binding`, subType: `Mount`: Pod to Persistent volume via Persistent volume claim<a target="_blank" href="https://playground.meshery.io/extension/meshmap?mode=design&amp;design=43d5fdfe-25f8-4c2c-be9d-30861bbc2a08"> (open in playground)</a> </figcaption>
        </figure>
        <img alt="Edge - Mount" src="/assets/img/meshmodel/relationships/edge_mount_relationship_pod_persistent_volume.svg" />
        <br />
        <figure>
            <figcaption>Type: `Non-Binding`, subType: `Network`: Ingress to Service<a target="_blank" href="https://playground.meshery.io/extension/meshmap?mode=design&amp;design=1f79b0c6-2efe-4ee9-b08c-e1bd07a3926b"> (open in playground)</a></figcaption>
        </figure>
        <img alt="Edge - Network" src="/assets/img/meshmodel/relationships/edge_network_ingress_to_service_relationship.svg" />
        <br />
        <figure>
            <figcaption>Type: `Non-Binding`, subType: `Network`: Service to Pod<a target="_blank" href="https://playground.meshery.io/extension/meshmap?mode=design&amp;design=90a9b4a0-a296-44b5-b1c5-7b1cb4827a77"> (open in playground)</a></figcaption>
        </figure>
        <img alt="Edge - Network: Ingress to Service" src="/assets/img/meshmodel/relationships/edge_network_service_to_pod_relationship.svg" />
        <br />
        <figure>
            <figcaption>Type: `Non-Binding`, subType: `Network`: Service to Service<a target="_blank" href="https://playground.meshery.io/extension/meshmap?mode=design&amp;design=4e368e07-5039-400e-b637-96b0241af799"> (open in playground)</a></figcaption>
        </figure>
        <img alt="Edge - Network" src="/assets/img/meshmodel/relationships/edge_network_service_to_service_relationship.svg" />
        <br />
        <figure>
            <figcaption>Type: `Non-Binding`, subType: `Network`: Service to Endpoint<a target="_blank" href="https://playground.meshery.io/extension/meshmap?mode=design&amp;design=ab35416d-7cf7-4540-8b2e-7271ffeadde2"> (open in playground)</a></figcaption>
        </figure>
        <img alt="Edge - Network" src="/assets/img/meshmodel/relationships/edge_network_service_to_endpoints_relationship.svg" />
        <br />
        <figure>
            <figcaption>Type: `Non-Binding`, subType: `Network`: Service to Deployment<a target="_blank" href="https://playground.meshery.io/extension/meshmap?mode=design&amp;design=33742281-428d-4340-b42e-6a0fd4ba1d0a"> (open in playground)</a></figcaption>
        </figure>
        <img alt="Edge - Network" src="/assets/img/meshmodel/relationships/network_edge_relationship_service_deployment.svg" />
        <br />
        <!-- <figure>
            <figcaption>Type: `Binding`, subType: `Permission`</figcaption>
        </figure>
        <img alt="Edge - Permission" src="/assets/img/meshmodel/relationships/permission_edge_relationship_role_service.png"/>
        <br>
        <figure>
            <figcaption>type: `Binding`,  subType: `Permission`: Role to Service</figcaption>
        </figure>
        <img alt="Edge - Permission" src="/assets/img/meshmodel/relationships/permission_edge_relationship_role_pod.png"/>
        <br>
        <figure>
            <figcaption>type: `Binding`, subType: `Permission`: Role to Deployment</figcaption>
        </figure>
        <img alt="Edge - Permission" src="/assets/img/meshmodel/relationships/permission_edge_relationship_role_deployment.png"/>
        <br>
        <figure>
            <figcaption>type: `Binding`, subType: `Permission`: Cluster Role to Pod</figcaption>
        </figure>
        <img alt="Edge - Permission" src="/assets/img/meshmodel/relationships/permission_edge_relationship_clusterrole_pod.png"/>
        <br>
        <figure>
            <figcaption>type: `Binding`, subType: `Permission`: Cluster Role to Service</figcaption>
        </figure>
        <img alt="Edge - Permission" src="/assets/img/meshmodel/relationships/permission_edge_relationship_clusterrole_service.png"/>
        <br>
        <figure>
            <figcaption>type: `Binding`, subType: `Permission`: Cluster Role to Deployment</figcaption>
        </figure>
        <img alt="Edge - Permission" src="/assets/img/meshmodel/relationships/permission_edge_relationship_clusterrole_deployment.png"/> -->
        <br />
        <figure>
            <figcaption><code>type:non-binding</code>, subType: `Network`: Network Policy (Pod to Pod) <a target="_blank" href="https://playground.meshery.io/extension/meshmap?mode=design&amp;design=58fda714-eaa4-490f-b228-b8bcfe3a1e47s"> (open in playground)</a></figcaption>
        </figure>
        <img alt="Edge - Network Policy" src="/assets/img/meshmodel/relationships/edge_firewall_relationship_pod_to_pod.svg" />
        </details>
    </details>

<p>Once selected, note the relationship’s <code class="language-plaintext highlighter-rouge">kind</code>, <code class="language-plaintext highlighter-rouge">type</code>, and <code class="language-plaintext highlighter-rouge">subtype</code> of your selected visualization. Alternatively, if an existing visualization does not seem appropriate for the relationship, please propose a new visualization at-will. Simply use the whiteboard feature of Meshery’s extensions to sketch out the relationship and propose it as a new visualization.</p>

<h2 id="development">Development</h2>

<p><a id="relationship-definitions"></a></p>

<h3 id="3-create-a-relationship-definition-as-a-json-file">3. Create a Relationship Definition as a JSON file</h3>

<p>Create a relationship definition as a JSON file, placing this new definition file into its respective model folder (see <a href="./contributing-models">Contributing to Models</a>). Relationship definition files are commonly named  <code class="language-plaintext highlighter-rouge">relationships.yaml</code> as a convention, however, this name is not required. A model may include any number of relationship definitions. Include the following attributes in your relationship definition:</p>

<ul>
  <li><code class="language-plaintext highlighter-rouge">kind</code>: The genre of relationship (e.g., hierarchical, edge, sibling).</li>
  <li><code class="language-plaintext highlighter-rouge">type</code>: The augmentative category of the relationship (e.g., binding, non-binding, inventory).</li>
  <li><code class="language-plaintext highlighter-rouge">subType</code>: The specific representative visual paradigm (e.g., parent, mount, network, wallet, badge).</li>
  <li><code class="language-plaintext highlighter-rouge">selectors</code>: The scope of the relationship, including the components involved and any constraints. Selector specify to which component(s) the relationship applies or does not apply (think of in terms of the <code class="language-plaintext highlighter-rouge">AND</code> operators in a query). Selector Sets are used to combine multiple selectors for more granular control over the logic used when matchmaking (establishing a relationship) between components (think of in terms of the <code class="language-plaintext highlighter-rouge">OR</code> operators in a query).</li>
  <li><code class="language-plaintext highlighter-rouge">evaluationQuery</code>: Name of the policy or policies (Open Policy Agent rego file(s)) to invoke for relationship evaluation. Identify an existing OPA policy as the <code class="language-plaintext highlighter-rouge">evaluationQuery</code> suitable to the relationship. If no policy exists, propose a new policy (rego). <em>(rarely necessary)</em> Create a new policy for the evaluation of your relationship using Rego. <em>This step is only necessary and can typically be skipped. Contact a maintainer if the relationship requires a new policy to evaluate the relationship.</em></li>
  <li><code class="language-plaintext highlighter-rouge">description</code>: A characterization of the relationship, its purpose, and any constraints or considerations of its application.</li>
</ul>

<div class="alert alert-info">
<h4 class="alert-heading">Use Existing Relationships as Examples</h4>
Browse the <a href="https://github.com/meshery/meshery/tree/master/server/meshmodel">existing relationships in the Meshery repository</a> to find examples of how to existing relationships, using them as a template. Alternatively, you can review a prior pull request as an example as well, for example <a href="https://github.com/meshery/meshery/pull/9880/files">PR #9880</a>.
</div>

<p><a class="anchorjs-link" id="relationship-scopes"></a></p>

<h3 id="4-configuring-the-scope-of-relationships">4. Configuring the Scope of Relationships</h3>

<p>The extent to which a relationship affects components within a model or beyond a model is defined and controlled using scopes. Scopes exist at two levels in Meshery relationships.</p>

<h4 id="global-scope">Global Scope</h4>

<p>Global scope is defined using the <code class="language-plaintext highlighter-rouge">model</code> and <code class="language-plaintext highlighter-rouge">version</code> attributes in the relationship definition.</p>

<p>Relationships can be confined to a specific model, a specific model version, or can be allowed to affect all models. The relationship schema has a <code class="language-plaintext highlighter-rouge">model</code> and <code class="language-plaintext highlighter-rouge">version</code> attribute which facilitates this control. For example, if the model is specified as <code class="language-plaintext highlighter-rouge">aws-ec2-controller</code>, the relationship will work for those components that belong to the <code class="language-plaintext highlighter-rouge">aws-ec2-controller</code> model.</p>

<h4 id="local-scope">Local Scope</h4>

<p>Local scope is defined and controlled via <code class="language-plaintext highlighter-rouge">selectors</code> attributes in the relationship definition.</p>

<p>Relationship selectors refine the scope of applicability the relationship. It is the details included within the Selector that determines whether there is a match and relationship to be formed. These details include which models and components are involved in the relationship and any constraints in its formation. Selector specify to which component(s) the relationship applies or does not apply (think of in terms of the <code class="language-plaintext highlighter-rouge">AND</code> operators in a query). Selector Sets are used to combine multiple selectors for more granular control over the logic used when matchmaking (establishing a relationship) between components (think of in terms of the <code class="language-plaintext highlighter-rouge">OR</code> operators in a query).</p>

<!-- @leecalcote: The following needs rewritten using Selector Sets, @MUzairS15 -->

<p>Selectors are structured as an array wherein each entry comprises a <code class="language-plaintext highlighter-rouge">from</code> (self) property and a <code class="language-plaintext highlighter-rouge">to</code> (others) property. The <code class="language-plaintext highlighter-rouge">from</code> and <code class="language-plaintext highlighter-rouge">to</code> combined with the <code class="language-plaintext highlighter-rouge">allow</code> and <code class="language-plaintext highlighter-rouge">deny</code> properties delineate between components involved in a particular relationship. These entries define the constraints necessary for the existence of a relationship, thus scoping a relationship. Each item in the selector uniquely defines a relation between the components listed. i.e. <code class="language-plaintext highlighter-rouge">from</code> and <code class="language-plaintext highlighter-rouge">to</code> fields are evaluated within the context of the selector.</p>

<p>Only the components within the same selector relate to each other via 1:many kind of relation between components listed inside the <code class="language-plaintext highlighter-rouge">from</code> and <code class="language-plaintext highlighter-rouge">to</code> field. i.e. Each object inside the <code class="language-plaintext highlighter-rouge">from</code> relates to each item inside the <code class="language-plaintext highlighter-rouge">two</code> field within a particular selector.</p>

<p>When defining relationships that involve a large number of combinations between <code class="language-plaintext highlighter-rouge">from</code> and <code class="language-plaintext highlighter-rouge">to</code>, selectors sets provide a mechanism to organize and manage these relationships. This prevents the need for crafting complex deny attributes and facilitates easier maintenance. Use of selector sets enhances flexibility and reusability in the definition and configuration of relationships among components.</p>

<p><em>Note: When defining Hierarchical relationships, remember that the <code class="language-plaintext highlighter-rouge">from</code> field represents the child component, while the <code class="language-plaintext highlighter-rouge">to</code> field represents the parent component.</em></p>

<details close="">
<summary>Relationship Selector Example</summary>


<figure class="highlight"><pre><code class="language-yaml" data-lang="yaml"><span class="na">selector</span><span class="pi">:</span> <span class="pi">[</span>
   <span class="pi">{</span>
      <span class="s2">"</span><span class="s">allow"</span><span class="pi">:</span> <span class="pi">{</span>
         <span class="s2">"</span><span class="s">from"</span><span class="pi">:</span> <span class="pi">[</span>
            <span class="pi">{</span>
               <span class="s2">"</span><span class="s">kind"</span><span class="pi">:</span> <span class="s2">"</span><span class="s">WASMFilter"</span><span class="pi">,</span>
               <span class="s2">"</span><span class="s">model"</span><span class="pi">:</span> <span class="s2">"</span><span class="s">istio-base"</span><span class="pi">,</span>
               <span class="s2">"</span><span class="s">patch"</span><span class="pi">:</span> <span class="pi">{</span>
                  <span class="s2">"</span><span class="s">patchStrategy"</span><span class="pi">:</span> <span class="s2">"</span><span class="s">replace"</span><span class="pi">,</span>
                  <span class="s2">"</span><span class="s">mutatorRef"</span><span class="pi">:</span> <span class="pi">[</span>
                     <span class="pi">[</span>
                        <span class="s2">"</span><span class="s">settings"</span><span class="pi">,</span>
                        <span class="s2">"</span><span class="s">config"</span>
                     <span class="pi">],</span>
                     <span class="pi">[</span>
                        <span class="s2">"</span><span class="s">settings"</span><span class="pi">,</span>
                        <span class="s2">"</span><span class="s">wasm-filter"</span>
                     <span class="pi">]</span>
                  <span class="pi">],</span>
                  <span class="s2">"</span><span class="s">description"</span><span class="pi">:</span> <span class="s2">"</span><span class="s">WASM</span><span class="nv"> </span><span class="s">filter</span><span class="nv"> </span><span class="s">configuration</span><span class="nv"> </span><span class="s">to</span><span class="nv"> </span><span class="s">be</span><span class="nv"> </span><span class="s">applied</span><span class="nv"> </span><span class="s">to</span><span class="nv"> </span><span class="s">Envoy</span><span class="nv"> </span><span class="s">Filter."</span>
               <span class="pi">}</span>
            <span class="pi">},</span>
            <span class="pi">{</span>
               <span class="s2">"</span><span class="s">kind"</span><span class="pi">:</span> <span class="s2">"</span><span class="s">EBPFFilter"</span><span class="pi">,</span>
   <span class="nv">.....</span>
            <span class="pi">}</span>
         <span class="pi">],</span>
         <span class="s2">"</span><span class="s">to"</span><span class="pi">:</span> <span class="pi">[</span>
            <span class="pi">{</span>
               <span class="s2">"</span><span class="s">kind"</span><span class="pi">:</span> <span class="s2">"</span><span class="s">EnvoyFilter"</span><span class="pi">,</span>
               <span class="s2">"</span><span class="s">model"</span><span class="pi">:</span> <span class="s2">"</span><span class="s">istio-base"</span><span class="pi">,</span>
               <span class="s2">"</span><span class="s">patch"</span><span class="pi">:</span> <span class="pi">{</span>
                  <span class="s2">"</span><span class="s">patchStrategy"</span><span class="pi">:</span> <span class="s2">"</span><span class="s">replace"</span><span class="pi">,</span>
                  <span class="s2">"</span><span class="s">mutatedRef"</span><span class="pi">:</span> <span class="pi">[</span>
                     <span class="pi">[</span>
                        <span class="s2">"</span><span class="s">settings"</span><span class="pi">,</span>
                        <span class="s2">"</span><span class="s">configPatches"</span><span class="pi">,</span>
                        <span class="s2">"</span><span class="s">_"</span><span class="pi">,</span>
                        <span class="s2">"</span><span class="s">patch"</span><span class="pi">,</span>
                        <span class="s2">"</span><span class="s">value"</span>
                     <span class="pi">]</span>
                  <span class="pi">],</span>
                  <span class="s2">"</span><span class="s">description"</span><span class="pi">:</span> <span class="s2">"</span><span class="s">Receive</span><span class="nv"> </span><span class="s">the</span><span class="nv"> </span><span class="s">WASM</span><span class="nv"> </span><span class="s">filter</span><span class="nv"> </span><span class="s">configuration."</span>
               <span class="pi">}</span>
            <span class="pi">},</span>
            <span class="pi">{</span>
               <span class="s2">"</span><span class="s">kind"</span><span class="pi">:</span> <span class="s2">"</span><span class="s">WASMPlugin"</span><span class="pi">,</span>
   <span class="nv">....</span>
            <span class="pi">}</span>
   <span class="nv">...</span>
         <span class="pi">]</span>
      <span class="pi">},</span>
      <span class="s2">"</span><span class="s">deny"</span><span class="pi">:</span> <span class="pi">{</span>
   <span class="nv">...</span>
      <span class="pi">}</span>
   <span class="pi">},</span>
   <span class="pi">{</span>
      <span class="s2">"</span><span class="s">allow"</span><span class="pi">:</span> <span class="pi">{</span>
         <span class="s2">"</span><span class="s">from"</span><span class="pi">:</span> <span class="pi">[</span>
            <span class="pi">{</span>
               <span class="s2">"</span><span class="s">kind"</span><span class="pi">:</span> <span class="s2">"</span><span class="s">ConfigMap"</span><span class="pi">,</span>
               <span class="s2">"</span><span class="s">model"</span><span class="pi">:</span> <span class="s2">"</span><span class="s">kubernetes"</span><span class="pi">,</span>
               <span class="s2">"</span><span class="s">patch"</span><span class="pi">:</span> <span class="pi">{</span>
                  <span class="s2">"</span><span class="s">patchStrategy"</span><span class="pi">:</span> <span class="s2">"</span><span class="s">replace"</span><span class="pi">,</span>
                  <span class="s2">"</span><span class="s">mutatorRef"</span><span class="pi">:</span> <span class="pi">[</span>
                     <span class="pi">[</span>
                        <span class="s2">"</span><span class="s">name"</span>
                     <span class="pi">]</span>
                  <span class="pi">],</span>
                  <span class="s2">"</span><span class="s">description"</span><span class="pi">:</span> <span class="s2">"</span><span class="s">In</span><span class="nv"> </span><span class="s">Kubernetes,</span><span class="nv"> </span><span class="s">ConfigMaps</span><span class="nv"> </span><span class="s">are</span><span class="nv"> </span><span class="s">a</span><span class="nv"> </span><span class="s">versatile</span><span class="nv"> </span><span class="s">resource</span><span class="nv"> </span><span class="s">that</span><span class="nv"> </span><span class="s">can</span><span class="nv"> </span><span class="s">be</span><span class="nv"> </span><span class="s">referenced</span><span class="nv"> </span><span class="s">by</span><span class="nv"> </span><span class="s">various</span><span class="nv"> </span><span class="s">other</span><span class="nv"> </span><span class="s">resources</span><span class="nv"> </span><span class="s">to</span><span class="nv"> </span><span class="s">provide</span><span class="nv"> </span><span class="s">configuration</span><span class="nv"> </span><span class="s">data</span><span class="nv"> </span><span class="s">to</span><span class="nv"> </span><span class="s">applications</span><span class="nv"> </span><span class="s">or</span><span class="nv"> </span><span class="s">other</span><span class="nv"> </span><span class="s">Kubernetes</span><span class="nv"> </span><span class="s">resources.</span><span class="se">\n\n</span><span class="s">By</span><span class="nv"> </span><span class="s">referencing</span><span class="nv"> </span><span class="s">ConfigMaps</span><span class="nv"> </span><span class="s">in</span><span class="nv"> </span><span class="s">these</span><span class="nv"> </span><span class="s">various</span><span class="nv"> </span><span class="s">contexts,</span><span class="nv"> </span><span class="s">you</span><span class="nv"> </span><span class="s">can</span><span class="nv"> </span><span class="s">centralize</span><span class="nv"> </span><span class="s">and</span><span class="nv"> </span><span class="s">manage</span><span class="nv"> </span><span class="s">configuration</span><span class="nv"> </span><span class="s">data</span><span class="nv"> </span><span class="s">more</span><span class="nv"> </span><span class="s">efficiently,</span><span class="nv"> </span><span class="s">allowing</span><span class="nv"> </span><span class="s">for</span><span class="nv"> </span><span class="s">easier</span><span class="nv"> </span><span class="s">updates,</span><span class="nv"> </span><span class="s">versioning,</span><span class="nv"> </span><span class="s">and</span><span class="nv"> </span><span class="s">maintenance</span><span class="nv"> </span><span class="s">of</span><span class="nv"> </span><span class="s">configurations</span><span class="nv"> </span><span class="s">in</span><span class="nv"> </span><span class="s">a</span><span class="nv"> </span><span class="s">Kubernetes</span><span class="nv"> </span><span class="s">environment."</span>
               <span class="pi">}</span>
            <span class="pi">}</span>
         <span class="pi">],</span>
         <span class="s2">"</span><span class="s">to"</span><span class="pi">:</span> <span class="pi">[</span>
            <span class="pi">{</span>
               <span class="s2">"</span><span class="s">kind"</span><span class="pi">:</span> <span class="s2">"</span><span class="s">Deployment"</span><span class="pi">,</span>
               <span class="s2">"</span><span class="s">model"</span><span class="pi">:</span> <span class="s2">"</span><span class="s">kubernetes"</span><span class="pi">,</span>
               <span class="s2">"</span><span class="s">patch"</span><span class="pi">:</span> <span class="pi">{</span>
                  <span class="s2">"</span><span class="s">patchStrategy"</span><span class="pi">:</span> <span class="s2">"</span><span class="s">replace"</span><span class="pi">,</span>
                  <span class="s2">"</span><span class="s">mutatedRef"</span><span class="pi">:</span> <span class="pi">[</span>
                     <span class="pi">[</span>
                        <span class="s2">"</span><span class="s">spec"</span><span class="pi">,</span>
                        <span class="s2">"</span><span class="s">containers"</span><span class="pi">,</span>
                        <span class="s2">"</span><span class="s">_"</span><span class="pi">,</span>
                        <span class="s2">"</span><span class="s">envFrom"</span><span class="pi">,</span>
                        <span class="s2">"</span><span class="s">configMapRef"</span><span class="pi">,</span>
                        <span class="s2">"</span><span class="s">name"</span>
                     <span class="pi">]</span>
                  <span class="pi">],</span>
                  <span class="s2">"</span><span class="s">description"</span><span class="pi">:</span> <span class="s2">"</span><span class="s">Deployments</span><span class="nv"> </span><span class="s">can</span><span class="nv"> </span><span class="s">reference</span><span class="nv"> </span><span class="s">ConfigMaps</span><span class="nv"> </span><span class="s">to</span><span class="nv"> </span><span class="s">inject</span><span class="nv"> </span><span class="s">configuration</span><span class="nv"> </span><span class="s">data</span><span class="nv"> </span><span class="s">into</span><span class="nv"> </span><span class="s">the</span><span class="nv"> </span><span class="s">Pods</span><span class="nv"> </span><span class="s">they</span><span class="nv"> </span><span class="s">manage.</span><span class="nv"> </span><span class="s">This</span><span class="nv"> </span><span class="s">is</span><span class="nv"> </span><span class="s">useful</span><span class="nv"> </span><span class="s">for</span><span class="nv"> </span><span class="s">maintaining</span><span class="nv"> </span><span class="s">consistent</span><span class="nv"> </span><span class="s">configuration</span><span class="nv"> </span><span class="s">across</span><span class="nv"> </span><span class="s">replica</span><span class="nv"> </span><span class="s">sets.</span><span class="se">\n\n</span><span class="s">The</span><span class="nv"> </span><span class="s">keys</span><span class="nv"> </span><span class="s">from</span><span class="nv"> </span><span class="s">the</span><span class="nv"> </span><span class="s">ConfigMap</span><span class="nv"> </span><span class="s">will</span><span class="nv"> </span><span class="s">be</span><span class="nv"> </span><span class="s">exposed</span><span class="nv"> </span><span class="s">as</span><span class="nv"> </span><span class="s">environment</span><span class="nv"> </span><span class="s">variables</span><span class="nv"> </span><span class="s">to</span><span class="nv"> </span><span class="s">the</span><span class="nv"> </span><span class="s">containers</span><span class="nv"> </span><span class="s">within</span><span class="nv"> </span><span class="s">the</span><span class="nv"> </span><span class="s">pods</span><span class="nv"> </span><span class="s">managed</span><span class="nv"> </span><span class="s">by</span><span class="nv"> </span><span class="s">the</span><span class="nv"> </span><span class="s">Deployment."</span>
               <span class="pi">}</span>
            <span class="pi">},</span>
            <span class="pi">{</span>
               <span class="s2">"</span><span class="s">kind"</span><span class="pi">:</span> <span class="s2">"</span><span class="s">StatefulSets"</span><span class="pi">,</span>
               <span class="s2">"</span><span class="s">model"</span><span class="pi">:</span> <span class="s2">"</span><span class="s">kubernetes"</span><span class="pi">,</span>
               <span class="s2">"</span><span class="s">patch"</span><span class="pi">:</span> <span class="pi">{</span>
   <span class="nv">....</span>
               <span class="pi">}</span>
            <span class="pi">}</span>
   <span class="nv">...</span>
         <span class="pi">]</span>
      <span class="pi">},</span>
      <span class="s2">"</span><span class="s">deny"</span><span class="pi">:</span> <span class="pi">{</span>
   <span class="nv">...</span>
      <span class="pi">}</span>
   <span class="pi">}</span>
<span class="pi">]</span></code></pre></figure>


The `selector` defined for the relationship between `WasmFilter` and `EnvoyFilter` components (the first item in the array) is entirely independent of the `selector` identified for the relationship between `ConfigMap` and `Deployment` components. This ensures independence in how these components relate to each other while still permitting similar types of relationships.

This example relationship demonstrates how the `WASMFilter` and `EBPFFilter` components identified in `from` relate to other `EnvoyFilter` `WASMPlugin` components identified in `to` selector. Similarly, `ConfigMap` component identified in the `from` selector corresponds to each `Deployment`, `StatefulSet`, and so on component identified in the `to` selector.

</details>

<h4 id="understanding-relationship-policies-and-their-evaluation">Understanding Relationship Policies and their Evaluation</h4>

<p>The <code class="language-plaintext highlighter-rouge">evaluationQuery</code> property in your relationship definition is used to identity the name of the policy to be used by Meshery’s evaluation engine. Meshery embeds Open Policy Agent as it’s policy engine</p>

<p><strong>How should you determine the value for <code class="language-plaintext highlighter-rouge">evaluationQuery</code></strong></p>

<p>All relationship definitions are backed by OPA policies and each relationship depends on their <code class="language-plaintext highlighter-rouge">kind</code>, <code class="language-plaintext highlighter-rouge">type</code>, and <code class="language-plaintext highlighter-rouge">subType</code> in order to be properly evaluated. Which evaluation policy or set of policies used during the evaluation moment is defined by the <code class="language-plaintext highlighter-rouge">evaluationQuery</code> property, which follows the naming convention of combining each of their  <code class="language-plaintext highlighter-rouge">kind</code>, <code class="language-plaintext highlighter-rouge">type</code>, and <code class="language-plaintext highlighter-rouge">subType</code>  properties with an underscore and the word “_relationship”, like so: <code class="language-plaintext highlighter-rouge">kind_type_subtype_relationship</code>.</p>

<p>So, for example, if you are defining or updating a relationship definition with <code class="language-plaintext highlighter-rouge">kind: edge</code> and <code class="language-plaintext highlighter-rouge">type: network</code>, the value for the attribute <code class="language-plaintext highlighter-rouge">evaluationQuery</code> should be <code class="language-plaintext highlighter-rouge">edge_network_relationship</code>.</p>

<p>Each policy has a set of evaluation rules defined and the <code class="language-plaintext highlighter-rouge">evaluationQuery</code> attribute corresponds to the main rule defined inside the policy, during the policy eval the results are collected from this rule.</p>

<h2 id="postwork">Postwork</h2>

<p><a id="relationship-testing"></a></p>

<h4 id="relationship-authoring-best-practices-and-considerations">Relationship Authoring Best Practices and Considerations</h4>

<h5 id="general">General</h5>

<ol>
  <li>Use camelCasing as the formatting convention.</li>
</ol>

<h5 id="scoping">Scoping</h5>

<ol>
  <li>To configure a relationship to be applied across models, ensure the <code class="language-plaintext highlighter-rouge">model</code> property for those relationships is set to <code class="language-plaintext highlighter-rouge">*</code>, to limit the relationships to a specific model, specify the correct <code class="language-plaintext highlighter-rouge">model</code>(case sensitive).</li>
  <li>To configure a relationship to be applied across all versions of a particular model, ensure the <code class="language-plaintext highlighter-rouge">version</code> property for those relationships is set to <code class="language-plaintext highlighter-rouge">*</code>, to limit the relationships to a specific version of a model, specify the correct model version.</li>
  <li>Specify <code class="language-plaintext highlighter-rouge">version</code> property as a regex to ensure relationships are applied to a subset of versions of a model.</li>
</ol>

<h5 id="actions">Actions</h5>

<ol>
  <li>If a path <code class="language-plaintext highlighter-rouge">mutatedRef/mutatorRef</code> contains more than one array path then only the first array position can be specified as <code class="language-plaintext highlighter-rouge">\_</code> for others explicitly mention them as 0</li>
  <li>Currently <code class="language-plaintext highlighter-rouge">mutatedRef</code> doesn’t support having an array.</li>
</ol>

<h5 id="matching">Matching</h5>

<ol>
  <li>Targets of a Relationship can be specific Components or entire Models.</li>
  <li>Values for propoerties like <code class="language-plaintext highlighter-rouge">kind</code>, <code class="language-plaintext highlighter-rouge">version</code>, and <code class="language-plaintext highlighter-rouge">model</code> are case-sensitive.</li>
  <li>Absence of a property in the <code class="language-plaintext highlighter-rouge">selector</code> is interpretted as the wildcard <code class="language-plaintext highlighter-rouge">*</code>.
    <ul>
      <li>For example, a selector with <code class="language-plaintext highlighter-rouge">kind: Pod</code>, <code class="language-plaintext highlighter-rouge">Model: Kubernetes</code>, and the absence of the <code class="language-plaintext highlighter-rouge">version</code> property would be interpretted as <code class="language-plaintext highlighter-rouge">version: *</code>, which
means that all the versions of the Kubernetes Pod resource (k8s.io/v1/betav2) will match the selector.</li>
    </ul>
  </li>
  <li>The <code class="language-plaintext highlighter-rouge">evaluationQuery</code> property determines the OPA policy to invoke for relationship evaluation, specify the correct rego query.</li>
</ol>

<h5 id="conflicts">Conflicts</h5>

<ol>
  <li>Ensure that the <code class="language-plaintext highlighter-rouge">deny</code> selectors and <code class="language-plaintext highlighter-rouge">allow</code> selectors do not conflict with each other i.e. relations are not getting overlapped for <code class="language-plaintext highlighter-rouge">allow</code> and <code class="language-plaintext highlighter-rouge">deny</code> selectors.</li>
  <li>In the event of conflicting Relationship Definitions, the union between them is taken.
    <ul>
      <li>If we have two Relationships, one from (Component A) to (Component B and Component F), and another
from (Component A) to (Component B and Component C), then it is similar to having a Relationship
from Component A to Component B, C and F</li>
    </ul>
  </li>
  <li>In the event of an overlapping set of complementary Relationship Definitions, Union.</li>
  <li>In the event of an overlapping set of conflicting Relationship Definitions, no relationship type (Kind) is inherently more important than the next one, so will not be any case of conflict.</li>
</ol>

<p><a class="anchorjs-link" id="relationship-contribution"></a></p>

<h4 id="4-contribute-your-relationship-to-the-meshery-project">4. Contribute your relationship to the Meshery project</h4>

<p>Submit a pull request to the Meshery repository with your new relationship definition, so that all users can benefit from the relationship(s) you have defined.</p>

<p>Keeping your relationship definition in a separate file allows for easier management and review of the relationship(s) you have defined.</p>

<div class="alert alert-info">
<h4 class="alert-heading">Keeping your custom Relationships private</h4>
Alternatively, if you would like to keep the relatioship definition private, you can bundle your relatinship(s) in a custom model, import the custom model into your Meshery deployment. Your private relationship definition(s) will be registered in your Meshery Server's <a href="/concepts/logical/registry">registry</a> and available for use within your Meshery deployment.
</div>

<p>For more information refer - <a href="https://docs.google.com/document/d/16z5hA8qVfSq885of9LXFUVvfom-hQXr-6oTD_GgoFmk/edit">Model - Construct Models in Meshery</a></p>


<script>
  /*clipboard.js code*/
</script>

<!-- <script
  src="https://code.jquery.com/jquery-3.3.1.min.js"
  integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8="
  crossorigin="anonymous"></script>

<script>
$(document).ready(function() {

    var toc = $('#TOC');

    // Select each header
    sections = $('.td-content h1');
        $.each(sections, function(idx, v) {
            section = $(v);
            var div_id = $(section).attr('id');
            if(!section.hasClass('noTOC')){
               var div_text = section.text().split('¶')[0];
              var parent = $("#" + div_id)
              var content = '<li id="link_' + div_id + '" class="md-nav__item"><a class="md-nav__link" href="#' + div_id + '" title="' + div_text +'">' + div_text +'</a></li>';
              $(document).find(toc).append(content);
            }

            // Add section code to subnavigation
            var children = $('<nav class="md-nav"><ul class="md-nav__list"></nav></ul>')
            var contenders = $("#" + div_id).nextUntil("h1");
            $.each(contenders, function(idx, contender){
               if( !$(contender).hasClass("noTOC") && ($(contender).is('h2') || $(contender).is('h3')) ) {
                   var contender_id = $(contender).attr('id');
                   var contender_text = $(contender).text().split('¶')[0];
                   var content = '<li class="md-nav__item"><a class="md-nav__link" href="#' + contender_id + '" title="' + contender_text +'">' + contender_text +'</a></li>';
                   children.append(content);
                }
             })
             $("#link_" + div_id).append(children);
        });
        //added 'selected' tag to the first element of toc
        $('.md-nav__link').first().addClass('selected');

        $(window).scroll(function(e){
          // Detect how far are we from the top of the page
          let windowTop = $(this).scrollTop();
          // Loop through every navigation menu item
          $('.md-nav__link').each(function (event) {       
              if (windowTop >= $($(this).attr('href')).offset().top - 100) {
              // Remove 'selected' from previously highlighted menu items
              $('.selected').removeClass('selected');
              // Highlight the current menu item by adding 'selected' class
              $(this).addClass('selected');
          }
          if($(window).scrollTop() + $(window).height() > $(document).height() - 10) {
            $('.selected').removeClass('selected');
              $(this).addClass('selected');
          }
        });
      })
      // Smooth scroll to target section when clicking on TOC link
      $('a[href^="#"]').on('click', function(event) {
        event.preventDefault();
        var target = $(this.hash);
        if (target.length) {
          $('html, body').animate({
          scrollTop: target.offset().top - 70
          }, 1000);
        }
      });
    });
</script> -->   
          
            


<h2>Suggested Reading</h2>






<ul>
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
    <li><a href="/project/contributing/build-and-release">Build & Release (CI)</a>
      
      - Details of Meshery's build and release strategy.
      
    </li>
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
    <li><a href="/project/contributing/contributing-adapters">Contributing to Meshery Adapters</a>
      
      - How to contribute to Meshery Adapters
      
    </li>
    
  
    
    <li><a href="/project/contributing/contributing-cli">Contributing to Meshery CLI</a>
      
      - How to contribute to Meshery Command Line Interface.
      
    </li>
    
  
    
    <li><a href="/project/contributing/contributing-cypress">Contributing to Meshery's End-to-End Tests using Cypress</a>
      
      - How to contribute to End-to-End Tests using Cypress.
      
    </li>
    
  
    
    <li><a href="/project/contributing/contributing-docker-extension">Contributing to Meshery Docker Extension</a>
      
      - How to contribute to Meshery Docker Extension
      
    </li>
    
  
    
    <li><a href="/project/contributing/contributing-docs">Contributing to Meshery Docs</a>
      
      - How to contribute to Meshery Docs.
      
    </li>
    
  
    
    <li><a href="/project/contributing/contributing-error">How to write MeshKit compatible errors</a>
      
      - How to declare errors in Meshery components.
      
    </li>
    
  
    
    <li><a href="/project/contributing/contributing-gitflow">Contributing to Meshery using git</a>
      
      - How to contribute to Meshery using git
      
    </li>
    
  
    
    <li><a href="/project/contributing/contributing-cli-guide">Meshery CLI Contributing Guidelines</a>
      
      - Design principles and code conventions.
      
    </li>
    
  
    
    <li><a href="/project/contributing/contributing-components">Contributing to Model Components</a>
      
      - How to contribute to Meshery Model Components
      
    </li>
    
  
    
  
    
    <li><a href="/project/contributing/contributing-models-quick-start">Contributing to Models Quick Start</a>
      
      - A no-fluff guide to creating your own Meshery Models quickly.
      
    </li>
    
  
    
    <li><a href="/project/contributing/contributing-models">Contributing to Models</a>
      
      - How to contribute to Meshery Models, Components, Relationships, Policies...
      
    </li>
    
  
    
    <li><a href="/project/contributing/contributing-policies">Contributing to Meshery Policies</a>
      
      - How to contribute to Meshery Policies
      
    </li>
    
  
    
    <li><a href="/project/contributing/contributing-server-events">Contributing to Meshery Server Events</a>
      
      - Guide is to help backend contributors send server events using Golang.
      
    </li>
    
  
    
    <li><a href="/project/contributing/contributing-ui-notification-center">Contributing to Meshery UI - Notification Center</a>
      
      - How to contribute to the Notification Center in Meshery's web-based UI.
      
    </li>
    
  
    
    <li><a href="/project/contributing/contributing-ui-sistent">Contributing to Meshery UI - Sistent</a>
      
      - How to contribute to the Meshery's web-based UI using sistent design system.
      
    </li>
    
  
    
    <li><a href="/project/contributing/contributing-ui-tests">Contributing to Meshery's End-to-End Tests</a>
      
      - How to contribute to End-to-End Tests using Playwright.
      
    </li>
    
  
    
    <li><a href="/project/contributing/contributing-ui">Contributing to Meshery UI</a>
      
      - How to contribute to Meshery UI (web-based user interface).
      
    </li>
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
    <li><a href="/project/contributing/contributing-server">Contributing to Meshery Server</a>
      
      - How to contribute to Meshery Server
      
    </li>
    
  
    
    <li><a href="/project/contributing/meshery-windows">Setting up Meshery Development Environment on Windows</a>
      
      - How to set up Meshery Development Environment on Windows
      
    </li>
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
    <li><a href="/project/contributing/test-status">End-to-End Test Status</a>
      
      - Status reports of Meshery's various test results.
      
    </li>
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
    
  
</ul> 
           
          <br/>


        </div>
      </main>
      
      <div class="content-table-wrapper">
        <div class="content-table">
          <div class="content-table__editable"><strong>Tools</strong>
<a href="https://github.com/meshery/meshery/issues/new?assignees=&labels=area%2Fdocs%2C+framework%2Fjekyll&template=documentation.md&title=%5BDocs%5D" rel="noopener" target="_blank"><i class="fab fa-github fa-fw"></i> Create doc issue</a>
<a href="https://github.com/meshery/meshery/blob/master/docs/pages/project/contributing/contributing-model-relationships.md" rel="noopener" target="_blank"><i class="fa fa-edit fa-fw"></i> Edit this page</a>
<a href="https://github.com/meshery/meshery/new/master/docs/pages/project/contributing/contributing-model-relationships.md?filename=change-me.md&value=---%0Atitle%3A+%22Long+Page+Title%22%0AlinkTitle%3A+%22Short+Nav+Title%22%0Aweight%3A+100%0Adescription%3A+%3E-%0A+++++Page+description+for+heading+and+indexes.%0A---%0A%0A%23%23+Heading%0A%0AEdit+this+template+to+create+your+new+page.%0A%0A%2A+Give+it+a+good+name%2C+ending+in+%60.md%60+-+e.g.+%60getting-started.md%60%0A%2A+Edit+the+%22front+matter%22+section+at+the+top+of+the+page+%28weight+controls+how+its+ordered+amongst+other+pages+in+the+same+directory%3B+lowest+number+first%29.%0A%2A+Add+a+good+commit+message+at+the+bottom+of+the+page+%28%3C80+characters%3B+use+the+extended+description+field+for+more+detail%29.%0A%2A+Create+a+new+branch+so+you+can+preview+your+new+file+and+request+a+review+via+Pull+Request.%0A" rel="noopener" target="_blank"><i class="fa fa-plus fa-fw"></i> Create new page</a>


<!-- this will parse through the header fields and add a button to open
     an issue / ask a question on Github. The editable field should be in
     the post frontend matter, and refer to the label to open the issue for -->
     
</div>
          <nav id="TableOfContents">
            <strong>Contents</strong>
            <ul>
              <li>
                <ul id="TOC">
                  <!-- Links will be appended here-->
                </ul>
              </li>
            </ul>
          </nav>
        </div>
      </div>
      
    </div>
    <footer class="footer">
  <!-- meshery-custom-begin"
      <div class="col-6 col-sm-4 text-xs-center order-sm-2">

<ul class="list-inline mb-0">
  <li class="list-inline-item mx-2 h3" data-toggle="tooltip" data-placement="top" title="" aria-label="Twitter" data-original-title="Twitter">
    <a class="text-white" target="_blank" href="https://twitter.com/https://twitter.com/mesheryio">
      <i class="fab fa-twitter"></i>
    </a>
  </li>
</ul>
</div>
<div class="col-6 col-sm-4 text-right text-xs-center order-sm-3">
<ul class="list-inline mb-0">
  <li class="list-inline-item mx-2 h3" data-toggle="tooltip" data-placement="top" title="" aria-label="GitHub" data-original-title="GitHub">
    <a class="text-white" target="_blank" href="https://github.com/meshery/meshery">
      <i class="fab fa-github"></i>
    </a>
  </li>
</ul>
meshery-custom-end -->
  <div class="text-white">&copy; 2025 The Meshery Authors</div>
  

  <!-- meshery-custom-begin -->

  <div class="footer-icons-list">
    <div class="footer-icons">
      <a class="social__link social__link--forum" href="http://discuss.meshery.io" target="_blank" rel="noreferrer">
        <img
          src=""
          alt="forum"
        />
        <span class="footer-icons-text">Community discussion forum</span>
      </a>
    </div>

    <div class="footer-icons">
      <a class="social__link social__link--mail" href="https://meshery.io/subscribe" target="_blank" rel="noreferrer">
        <img
          src=""
          alt="mail"
        />
        <span class="footer-icons-text">Get connected with the community</span>
      </a>
    </div>

    <div class="footer-icons">
      <a class="social__link social__link--slack" href=" https://slack.meshery.io/" target="_blank" rel="noreferrer">
        <img
          class="slack"
          src=""
          alt="slack"
        />
        <span class="footer-icons-text">Join the Meshery Slack</span>
      </a>
    </div>

    <div class="footer-icons">
      <a class="social__link" href="https://meshery.io/calendar">
        <svg fill="#666666" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 18">
          <path
            d="M3.5 0a.5.5 0 0 1 .5.5V1h8V.5a.5.5 0 0 1 1 0V1h1a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V3a2 2 0 0 1 2-2h1V.5a.5.5 0 0 1 .5-.5zM1 4v10a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V4H1z"
          />
          <g stroke-linecap="undefined" stroke-linejoin="undefined">
            <path d="M-3.468 8.168h-.033m25.313-4.242l-.063-.254M7.858 4.814v9.387" />
            <path d="M1.833 9.507h12.051" />
          </g>
        </svg>
        <span class="footer-icons-text">Subscribe to the community calendar</span>
      </a>
    </div>

    <div class="footer-icons">
      <a class="social__link" href="https://twitter.com/mesheryio" target="_blank" rel="noreferrer">
       <svg alt="twitter" class="twitter" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" version="1.1" height="1.8em"><path d="M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z" fill="#666666"></path></svg>
       <span class="footer-icons-text">Follow on Twitter</span>
      </a>
    </div>

    <div class="footer-icons">
      <a class="social__link" href="https://github.com/meshery" target="_blank" rel="noreferrer">
        <img
          class="github"
          src=""
          alt="github"
        />
        <span class="footer-icons-text">Contribute on GitHub</span>
      </a>
    </div>

    <div class="footer-icons">
      <a class="social__link" href="https://www.linkedin.com/showcase/meshery/" target="_blank" rel="noreferrer">
        <img
          class="linkedin"
          src=""
          alt="linkedin"
        />
        <span class="footer-icons-text">Connect on LinkedIn</span>
      </a>
    </div>

    <div class="footer-icons">
      <a
        class="social__link"
        href="https://www.youtube.com/mesheryio?sub_confirmation=1"
        target="_blank"
        rel="noreferrer"
      >
        <img
          class="youtube"
          src=""
          alt="youtube"
        />
        <span class="footer-icons-text">Watch community meeting recordings</span>
      </a>
    </div>

    <div class="footer-icons">
      <a class="social__link" href="https://hub.docker.com/u/meshery/" target="_blank" rel="noreferrer">
        <img
          class="docker"
          src=""
          alt="docker"
        />
        <span class="footer-icons-text">Access Docker images</span>
      </a>
    </div>
  </div>
  <!-- meshery-custom-end -->
</footer>

<script src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/clipboard@1/dist/clipboard.min.js"></script>

<script type="text/javascript" src="/assets/js/lightbox.js"></script>
<link rel="stylesheet" href="/assets/css/lightbox.css" />
<script type="module" src="https://md-block.verou.me/md-block.js"></script>

 <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>
<script src="/assets/js/main.js"></script>
<script src="/assets/js/navbar.js"></script>

 <script async src='https://www.google-analytics.com/analytics.js'></script>
<script type="application/javascript">
var doNotTrack = false;
if (!doNotTrack) {
	window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
	ga('create', 'UA-00000000-0', 'auto');
	ga('send', 'pageview');
}
</script>

  </body>
</html>
<script
  src="https://code.jquery.com/jquery-3.3.1.min.js"
  integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8="
  crossorigin="anonymous"></script>

<script>
$(document).ready(function() {

    var toc = $('#TOC');

    // Select each header
    sections = $('.td-content h1');
        $.each(sections, function(idx, v) {
            section = $(v);
            var div_id = $(section).attr('id');
            if(!section.hasClass('noTOC')){
               var div_text = section.text().split('¶')[0];
              var parent = $("#" + div_id)
              var content = '<li id="link_' + div_id + '" class="md-nav__item"><a class="md-nav__link" href="#' + div_id + '" title="' + div_text +'">' + div_text +'</a></li>';
              $(document).find(toc).append(content);
            }

            // Add section code to subnavigation
            var children = $('<nav class="md-nav"><ul class="md-nav__list"></nav></ul>')
            var contenders = $("#" + div_id).nextUntil("h1");
            $.each(contenders, function(idx, contender){
               if( !$(contender).hasClass("noTOC") && ($(contender).is('h2') || $(contender).is('h3')) ) {
                   var contender_id = $(contender).attr('id');
                   var contender_text = $(contender).text().split('¶')[0];
                   var content = '<li class="md-nav__item"><a class="md-nav__link" href="#' + contender_id + '" title="' + contender_text +'">' + contender_text +'</a></li>';
                   children.append(content);
                }
             })
             $("#link_" + div_id).append(children);
        });
        //added 'selected' tag to the first element of toc
        $('.md-nav__link').first().addClass('selected');

        $(window).scroll(function(e){
          // Detect how far are we from the top of the page
          let windowTop = $(this).scrollTop();
          // Loop through every navigation menu item
          $('.md-nav__link').each(function (event) {       
              if (windowTop >= $($(this).attr('href')).offset().top - 100) {
              // Remove 'selected' from previously highlighted menu items
              $('.selected').removeClass('selected');
              // Highlight the current menu item by adding 'selected' class
              $(this).addClass('selected');
          }
          if($(window).scrollTop() + $(window).height() > $(document).height() - 10) {
            $('.selected').removeClass('selected');
              $(this).addClass('selected');
          }
        });
      })
      // Smooth scroll to target section when clicking on TOC link
      $('a[href^="#"]').on('click', function(event) {
        event.preventDefault();
        var target = $(this.hash);
        if (target.length) {
          $('html, body').animate({
          scrollTop: target.offset().top - 70
          }, 1000);
        }
      });
    });
</script>

